package com.simtop.domain.user;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.metadata.BaseRowModel;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @ClassName SysUser
 * @Description TODO  系统用户信息
 * @Author lvyongwei
 * @Date 2020-08-17 17:53
 **/
@Data
@Alias("user")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class SysUser extends BaseRowModel implements Serializable {

    /**
     * 用户id
     */
    @ExcelIgnore
    private Long userId;

    /**
     * 用户名称
     */
    @ExcelProperty(value = "工号/学号(必填)")
    @ColumnWidth(value = 25)
    private String userName;

    /**
     * 用户密码
     */
    @ExcelIgnore
    private String password;

    /**
     * 真实姓名
     */
    @ExcelProperty(value = "真实姓名(必填)")
    @ColumnWidth(value = 25)
    private String realName;

    /**
     * 性别
     */
    @ExcelProperty(value = "性别")
    private String sex;

    /**
     * 头像
     */
    @ExcelIgnore
    private String avatar;

    /**
     * 电话
     */
    @ExcelProperty(value = "电话(必填)")
    @ColumnWidth(value = 25)
    private String phone;

    /**
     * 邮箱
     */
    @ExcelProperty(value = "邮箱(必填)")
    @ColumnWidth(value = 25)
    private String email;

    /**
     * 创建时间
     */
    @ExcelIgnore
    private Date createTime;

    /**
     * 删除状态   0:正常 1:删除 2:停用
     */
    @ExcelIgnore
    private int delStatus;

    /**
     * 角色对象
     */
    @ExcelIgnore
    private List<Role> roles;

    /**
     * 角色id
     */
    @ExcelIgnore
    private Integer[] roleIds;

    /**
     * 注册时验证码
     */
    @ExcelIgnore
    private String registerCode;
}
